<%@page pageEncoding="utf-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<table border="1" align="center" width="80%">
      <tr>
          <th>编号</th>
          <th>名称</th>
          <th>价格</th>
          <th>操作</th>
      </tr>

     <c:forEach items="${list}" var="g">
    <tr align="center">
        <td>${g.gid}</td>
        <td>${g.gname}</td>
        <td>${g.gprice}</td>
        <td>
            <button onclick="go(${g.gid})">设为秒杀</button>
        </td>
    </tr>
</c:forEach>
</table>

<script>
    function go(gid) {
        location = "/setSeckillGoods.jsp?gid="+gid;
    }

</script>
